package com.bambooshoot.domain.bo;

import com.bambooshoot.common.core.domain.BaseEntity;
import com.bambooshoot.common.validate.AddGroup;
import com.bambooshoot.common.validate.EditGroup;
import com.bambooshoot.domain.BizTravel;
import com.fasterxml.jackson.annotation.JsonFormat;
import io.github.linpeilie.annotations.AutoMapper;
import jakarta.validation.constraints.NotBlank;
import jakarta.validation.constraints.NotNull;
import lombok.Data;
import lombok.EqualsAndHashCode;
import org.springframework.format.annotation.DateTimeFormat;

import java.math.BigDecimal;
import java.util.Date;

/**
 * 旅游目的地业务对象 biz_travel
 *
 * @author mxc
 * @date 2024-07-10
 */
@Data
@EqualsAndHashCode(callSuper = true)
@AutoMapper(target = BizTravel.class, reverseConvertGenerate = false)
public class BizTravelBo extends BaseEntity {

    /**
     * 主键
     */
    @NotNull(message = "主键不能为空", groups = {EditGroup.class})
    private Long id;

    /**
     * 名称
     */
    @NotBlank(message = "名称不能为空", groups = {AddGroup.class, EditGroup.class})
    private String name;

    /**
     * 开始时间
     */
    @NotNull(message = "开始时间不能为空", groups = {AddGroup.class, EditGroup.class})
//    @DateTimeFormat(pattern = "yyyy-MM-dd")
//    @JsonFormat(shape = JsonFormat.Shape.STRING, pattern = "yyyy-MM-dd")
    private Date beginDate;

    /**
     * 结束时间
     */
    @NotNull(message = "结束时间不能为空", groups = {AddGroup.class, EditGroup.class})
//    @DateTimeFormat(pattern = "yyyy-MM-dd")
//    @JsonFormat(shape = JsonFormat.Shape.STRING, pattern = "yyyy-MM-dd")
    private Date endDate;

    /**
     * 花费金额(元)
     */
    private BigDecimal amount;

    /**
     * 年份
     */
    @DateTimeFormat(pattern = "yyyy-MM-dd")
    @JsonFormat(shape = JsonFormat.Shape.STRING, pattern = "yyyy-MM-dd")
    private Date travelYear;

    /**
     * 最低收入金额(元)
     */
    private BigDecimal minAmount;

    /**
     * 最高收入金额(元)
     */
    private BigDecimal maxAmount;

    /**
     * 备注
     */
    private String remark;


}
